Eclipse Platform
Pre-release 3.0

org.eclipse.ui.texteditor
Class DefaultAnnotation

java.lang.Object
  extended byorg.eclipse.jface.text.source.Annotation
      extended byorg.eclipse.ui.texteditor.DefaultAnnotation
All Implemented Interfaces:
IAnnotationPresentation

Deprecated. use Annotation and ImageUtilities, stay with layer definitions until new home found for them

public class DefaultAnnotation
extends Annotation
implements IAnnotationPresentation

Default annotation. This class may be instantiated or be subclassed.

XXX: This is work in progress and can change anytime until API for 3.0 is frozen.

Since:
3.0

Field Summary
static int BOOKMARK_LAYER
          Deprecated. The layer in which bookmarks annotatons are located.
static int ERROR_LAYER
          Deprecated. The layer in which error annotations representing are located.
protected  Image fImage
          Deprecated.  
protected  String fImageName
          Deprecated.  
static int INFO_LAYER
          Deprecated. The layer in which info annotations are located.
static int TASK_LAYER
          Deprecated. The layer in which task annotations are located.
static int WARNING_LAYER
          Deprecated. The layer in which warning annotations representing are located.
 
Fields inherited from class org.eclipse.jface.text.source.Annotation
TYPE_UNKNOWN
 
Constructor Summary
DefaultAnnotation(String markerType, int severity, boolean isTemporary, String message)
          Deprecated. Creates a new annotation.
 
Method Summary
protected  Image getImage(Display display)
          Deprecated.  
protected static Image getImage(Display display, ImageDescriptor descriptor)
          Deprecated. Returns an image for the given display as specified by the given image descriptor.
protected  Image getImage(String name)
          Deprecated. Returns the image of the given name.
protected static Map getImageRegistry(Display display)
          Deprecated. Returns an image registry for the given display.
protected  String getUnknownImageName(String annotationType)
          Deprecated. Returns the name of an image used to visually represent markers of unknown type.
protected  void initialize()
          Deprecated. Initializes the annotation's icon representation and its drawing layer based upon the properties of the underlying marker.
 void paint(GC gc, Canvas canvas, Rectangle r)
          Deprecated. Implement this method to draw a graphical representation of this annotation within the given bounds.
protected  void setImage(Image image)
          Deprecated. Sets the marker image to the given image.
 
Methods inherited from class org.eclipse.jface.text.source.Annotation
drawImage, drawImage, getLayer, getText, getType, isMarkedDeleted, isPersistent, markDeleted, setLayer, setText, setType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.jface.text.source.IAnnotationPresentation
getLayer
 

Field Detail

TASK_LAYER

public static final int TASK_LAYER
Deprecated. 
The layer in which task annotations are located.

See Also:
Constant Field Values

BOOKMARK_LAYER

public static final int BOOKMARK_LAYER
Deprecated. 
The layer in which bookmarks annotatons are located.

See Also:
Constant Field Values

INFO_LAYER

public static final int INFO_LAYER
Deprecated. 
The layer in which info annotations are located.

See Also:
Constant Field Values

WARNING_LAYER

public static final int WARNING_LAYER
Deprecated. 
The layer in which warning annotations representing are located.

See Also:
Constant Field Values

ERROR_LAYER

public static final int ERROR_LAYER
Deprecated. 
The layer in which error annotations representing are located.

See Also:
Constant Field Values

fImage

protected Image fImage
Deprecated. 

fImageName

protected String fImageName
Deprecated. 
Constructor Detail

DefaultAnnotation

public DefaultAnnotation(String markerType,
                         int severity,
                         boolean isTemporary,
                         String message)
Deprecated. 
Creates a new annotation.

Parameters:
markerType - the marker type of this annotation
severity - the severity of this annotation
isTemporary - true if this is a temporary annotation
message - the message of this annotation
Method Detail

getImage

protected static Image getImage(Display display,
                                ImageDescriptor descriptor)
Deprecated. 
Returns an image for the given display as specified by the given image descriptor.

Parameters:
display - the display
descriptor - the image descriptor
Returns:
an image for the display as specified by the descriptor

getImageRegistry

protected static Map getImageRegistry(Display display)
Deprecated. 
Returns an image registry for the given display. If no such registry exists the resgitry is created.

Parameters:
display - the display
Returns:
the image registry for the given display

initialize

protected void initialize()
Deprecated. 
Initializes the annotation's icon representation and its drawing layer based upon the properties of the underlying marker.


getUnknownImageName

protected String getUnknownImageName(String annotationType)
Deprecated. 
Returns the name of an image used to visually represent markers of unknown type. This implementation returns null. Subclasses may replace this method.

Returns:
the name of an image for markers of unknown type.

paint

public void paint(GC gc,
                  Canvas canvas,
                  Rectangle r)
Deprecated. 
Description copied from interface: IAnnotationPresentation
Implement this method to draw a graphical representation of this annotation within the given bounds.

Specified by:
paint in interface IAnnotationPresentation
Overrides:
paint in class Annotation
Parameters:
canvas - the canvas to draw on
r - the bounds inside the canvas to draw on

setImage

protected void setImage(Image image)
Deprecated. 
Sets the marker image to the given image.

Parameters:
image - the new marker image

getImage

protected Image getImage(String name)
Deprecated. 
Returns the image of the given name. Subclasses may extend this method. If so, subclasses must assume responsibility for disposing the images they create.

Parameters:
name - the name of the requested image
Returns:
the image or null if there is no such image

getImage

protected Image getImage(Display display)
Deprecated. 

Eclipse Platform
Pre-release 3.0

Copyright (c) IBM Corp. and others 2000, 2003. All Rights Reserved.